<template>
  <div class="swipper-bar ">
    <marquee style="height:0.44rem" :interval="2000">
      <marquee-item v-for="(item,index) in userWithdrawalList" :key="index" class="swiper-wrapper" item-height="0.44rem">
        <div class="left">
          <div class="img-wrapper">
            <img :src='item.headImage.replace("https","http")' alt="">
          </div>
          <div class="info">
            <div class="name">
              {{item.nickname}}
            </div>
            <div class="win-award" v-show="item.type==2">
              {{item.time|timeFromat}} 成功提现
              <strong>¥{{item.amount}}</strong>
            </div>
            <div class="win-award" v-show="item.type==1">
              {{item.time|timeFromat}} 拆开了红包，赢得
              <strong>¥{{item.amount}}</strong>
            </div>
          </div>
        </div>
      </marquee-item>
    </marquee>
    <div class="rule-btn">
      <div>
        <span @click='$emit("rulesIsClick")' class="rules-link">{{flexLunbo.text}}</span>
      </div>
    </div>
  </div>
</template>

<script>
  import {
    Marquee,
    MarqueeItem
  } from 'vux'
  //  import {timeFromat} from "./../c"
  export default {
    data () {
      return {
        userWithdrawalList: []
      }
    },
    components: {
      Marquee,
      MarqueeItem
    },
    props: ['flexLunbo'],
    beforeCreate () {},
    mounted () {},
    methods: {}
  }
</script>

<style lang="less">
  .swipper-bar {
    width: 100%;
    height: 44/100rem;
    overflow: hidden;
    box-sizing: border-box;
    position: fixed;
    bottom: 0;
    z-index: 10;
    background: #c2463c;
    border-radius: 3px;
    font-family: PingFangSC-Regular;
    font-size: 10px;
    color: #f0f0f0;
    letter-spacing: 0;
    .swiper-wrapper {
      width: 100%;
      box-sizing: border-box;
      padding: 0;
      .left {
        width: 100%;
        height: 44/100rem;
        box-sizing: border-box;
        padding-right: 0.75rem;
        padding-left: 0.1rem;
        /*margin-top: -0.15rem;*/
        /*padding-top: 0.11rem;*/
        box-sizing: border-box;
        /*display: flex;*/
        /*justify-content: flex-start;*/
        /*justify-items: center;*/
        padding-top: (44-32)/200rem;
        .img-wrapper {
          text-align: center;
          display: inline-block;
          vertical-align: top;
          img {
            width: 0.32rem;
            height: 0.32rem;
            border-radius: 5px;
            line-height: 49/100rem;
          }
        }
        .info {
          display: inline-block;
          padding-left: 0.1rem;
          vertical-align: top;
          .name {
            height: 0.18rem;
            font-size: 13px;
            line-height: 0.18rem;
          }
          .win-award {
            height: 0.18rem;
            font-size: 10px;
            strong {
              font-family: PingFangSC-Medium;
              color: #fee890;
              letter-spacing: 0;
              line-height: 0.18rem;
              vertical-align: middle;
            }
          }
        }
      }
    }
    .rule-btn {
      position: absolute;
      height: 100%;
      box-sizing: border-box;
      /*border: 1px solid #000;*/
      right: 0.08rem;
      top: 0;
      text-align: center;
      .rules-link {
        display: inline-block;
        border-radius: 2px;
        text-align: center;
        line-height: 30/100rem;
        margin-top: (44-30)/200rem;
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #f0f0f0;
        letter-spacing: 0;
        background: #d9a526;
        border-radius: 2px;
        width: 62/100rem;
        height: 0.3rem;
      }
    }
  }
</style>

